﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Behavioral.Tests
{
    [TestFixture]
    public class InitializerCollectionTests : UnitTest<object>
    {
        [Test]
        public void InitializerCollectionsShouldNotThrow()
        {
            Assert.DoesNotThrow(() =>
                GivenThat<InitializerList>()
                    .And<Initializer1>()
                .When<DoingSomething>()
                );
        }

        class InitializerList : InitializerCollection
        {
            protected override void Register()
            {
                this.GivenThat<Initializer1>()
                    .And<Initializer2>();
            }
        }

        class Initializer1 : IInitializer<object>
        {
            public void SetUp(ref object target)
            {
                
            }
        }

        class Initializer2 : IInitializer<object>
        {
            public void SetUp(ref object target)
            {

            }
        }

        class DoingSomething : IAction<object>
        {
            public void Execute(object target)
            {
                
            }
        }

    }
}
